package com.abl.lib.excel;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.listener.PageReadListener;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;

@Slf4j
public class ExcelKit {
    public static void main(String[] args) {
        String path = "C:\\Users\\Administrator\\Desktop\\EasyExcelDemo.xlsx";
        simpleRead(path);
    }

    /**
     * 最简单的读
     */
    public static void simpleRead(String path) {
        EasyExcel.read(path, HashMap.class, new PageReadListener<HashMap>(dataList -> {
            for (HashMap demoData : dataList) {
                System.out.println(demoData);
            }
        })).sheet().doRead();


    }
}
